Skip to content

feat(onboarding): listener conclui git_challenge na aprovação do PR (#353) - #562

Merged
danielhe4rt merged 1 commit into
feat/squadsfrom
story/353-git-challenge-pr-approval-listener
Sep 28, 2026
Merged

danielhe4rt merged 1 commit into
feat/squadsfrom
story/353-git-challenge-pr-approval-listener

Conversation

@sirelves

Copy link
Copy Markdown
Contributor

Contexto

O step git_challenge do onboarding Squads conclui quando um revisor aprova, no GitHub, o PR do candidato num repo de desafio. O integration-github já emite o evento GithubPullRequestApproved. Esse PR entrega o listener que liga esse evento ao onboarding.

Alterações

  • CompleteGitChallengeOnPullRequestApproval (listener novo): resolve o autor via ExternalIdentity provider github, confere purpose=challenge e conclui o step git_challenge quando o onboarding Squads está parado exatamente nele. Registrado no OnboardingServiceProvider.
  • GitChallengeDTO fecha o contrato pros campos do PR aprovado (repo, pr_number, approved_at), no lugar do payload livre que só existia como placeholder.
  • Testes cobrindo os dois cenários do BDD da issue, mais autor sem GitHub vinculado e aprovação chegando antes do onboarding alcançar o step.

Plano de Testes

  • vendor/bin/pint limpo
  • vendor/bin/phpstan analyse limpo
  • pest app-modules/onboarding, 40 de 41 passando, a que falha é timezone pré-existente sem relação com o PR

Issues Relacionadas

Closes #353

…353)

GithubPullRequestApproved (#345) chega no onboarding via listener novo:
resolve o autor via ExternalIdentity (provider github), confere se o
repo aprovado é purpose=challenge e conclui o step git_challenge quando
o onboarding Squads está parado exatamente nele, liberando o APTO.
Aprovação em repo que não é de desafio é ignorada.

GitChallengeDTO fecha o contrato pros campos do PR aprovado (repo,
pr_number, approved_at), no lugar do payload livre que só existia como
placeholder.
@stherzada stherzada added this to the Onboarding milestone Sep 16, 2026

@danielhe4rt danielhe4rt left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@GabrielFVDev GabrielFVDev left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@gabi-gms gabi-gms left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@nathanmota-dev nathanmota-dev left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@1pride 1pride left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Dani-Medeiros Dani-Medeiros left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!!!

@vitoriazoche

Copy link
Copy Markdown

LGTM! Brilha moleque!!

@saraaniceto saraaniceto left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM ✨

@Danilo-Sam Danilo-Sam left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@hefeus hefeus left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@gabrielsrs gabrielsrs left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@ranyesantos ranyesantos left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@T-Nasser T-Nasser left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@buzinei-bibi buzinei-bibi left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm !!

@guiisbarbosa guiisbarbosa left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@evelynlacerda evelynlacerda left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

{
$this->loadMigrationsFrom(__DIR__.'/../database/migrations');

Event::listen(GithubPullRequestApproved::class, [CompleteGitChallengeOnPullRequestApproval::class, 'handle']);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Se não me engano o InterNACHI consegue encontrar o evento.

@danielhe4rt
danielhe4rt merged commit d2dde6e into feat/squads Sep 28, 2026
8 checks passed
@danielhe4rt
danielhe4rt deleted the story/353-git-challenge-pr-approval-listener branch September 28, 2026 22:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(onboarding): listener liga aprovação do PR → conclui git_challenge (APTO)